package com.wyh.mapper.gfivemapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wyh.domain.po.feemanagementpo.Organization;
import com.wyh.domain.po.gfive.Organizations;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author TanXingYuan
 */
@Mapper
public interface OrganizationMapper extends BaseMapper<Organizations> {
    /**
     * 查询所有的组织名称
     * return id name superiorid
     */
    @Select("select organization.id,organization.name,organization.superiorid from organization")
    List<Organizations> findOrganizations();
    /**
     * 根据组织ID查找企业名称
     * return name
     */
    @Select("select organization.name from organization where organization.id = #{id}")
    String findOrganizationNameById(int id);
}
